<template>
    <div>
    <h1>Message View</h1> 
    <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="id" label="ID" width="120"></el-table-column>
        <el-table-column prop="title" label="Title" width="200"></el-table-column>
        <el-table-column prop="content" label="Content" width="300"></el-table-column>
        <el-table-column prop="createTime" label="Create Time" width="200"></el-table-column>
    </el-table>
</div>
</template>

<script>
export default {
    name: 'MessageView',
    data() {
        return {
            tableData: [
                {
                    id: 1,
                    title: 'Hello',
                    content: 'World',
                    createTime: '2021-01-01 12:00:00'
                },
                {
                    id: 2,
                    title: 'Vue',
                    content: 'is awesome',
                    createTime: '2021-01-02 12:00:00'
                },
                {
                    id: 3,
                    title: 'Element',
                    content: 'is cool',
                    createTime: '2021-01-03 12:00:00'
                }
            ]
        }
    },
    // created() {
    //     this.fetchData()
    // },
    // methods: {
    //     fetchData() {
    //         this.$http.get('/api/message/list').then(response => {
    //             this.tableData = response.data.data
    //         })
    //     }
    // }
}
</script>

<style scoped>

</style>